﻿using System;

namespace Zuehlke.Blueprint.Quickstart.Architecture.Presentation.Services.Interfaces.BackgroundTasks
{
    /// <summary>
    /// Interface containing the result and additional info about a finished background task.
    /// </summary>
    public interface IFinishedBackgroundTask<out TResult>
    {
        /// <summary>
        /// Gets the result.
        /// </summary>
        TResult Result { get; }

        /// <summary>
        /// Gets a value indicating whether this instance is cancelled.
        /// </summary>
        bool IsCancelled { get; }

        /// <summary>
        /// Gets the (possible) exception.
        /// </summary>
        Exception Exception { get; }
    }
}